package Controller_Command_21;

import Controller_Command_21.commands.*;

public class RemoteControl {
    private Command command;

    public RemoteControl() {}

    public void setCommand(Command command) {
        this.command = command;
    }

    public void LightOn(){
        command = new LightCommand();
        command.execute();
    }

    public void LightOff(){
        command = new LightCommand();
        command.undo();
    }

    public void FanOn() {
        command = new FanCommand();
        command.execute();
    }

    public void FanOff() {
        command = new FanCommand();
        command.undo();
    }

    public void TVOn() {
        command = new TVCommand();
        command.execute();
    }

    public void TVOff() {
        command = new TVCommand();
        command.undo();
    }
}
